<template>
  <div class="table-default" style="padding: 10px">
    <span class="">
      <el-button type="warning" @click="PrintNow = true">确认打印</el-button>
      <el-button @click="handlerClose">关闭</el-button>
    </span>
    <barCode :PrintNow="PrintNow" @send-data="getDataHandler"></barCode>

  </div>
</template>

<script setup>
import storage from '/admin/utils/storage'
import barCode from './barCode.vue'
import { useRouter } from 'vue-router'
let router = useRouter()


let barcodeList = ref(storage.getItem('barcodeList'))
console.log('选中数组',barcodeList);
let PrintNow = ref(false)
const handlerClose = () => {
  barcodeList.value = []
  // let routeList = storage.getItem('routeList')
  let routeList = JSON.parse(sessionStorage.getItem('routeList'))
  console.log(routeList);
  routeList = routeList.filter(item=>item.title != "工单打印")
  // storage.setItem('routeList',routeList)
  sessionStorage.setItem('routeList',JSON.stringify(routeList))

  router.push('/production/productionOrder')
}
</script>

<style>
</style>